﻿
namespace ParaEditor.DomainSource.Entities
{
    public class SubRoadPk
    {
        public virtual int algVer { get; set; }
        public virtual int roadSeq { get; set; }
        public virtual int OId { get; set; }
        public virtual int DId { get; set; }
        public virtual int wayId { get; set; }
        public virtual int subroadSeq { get; set; }
        public virtual int wayPercent { get; set; }
        public virtual int subOrigIndex { get; set; }
        public virtual int subDestIndex { get; set; }
        public virtual int subroadLength { get; set; }
        public virtual int subroadTime { get; set; }

        public override bool Equals(object obj)
        {
            if (obj is SubRoadPk)
            {
                SubRoadPk pk = obj as SubRoadPk;
                if (this.algVer == pk.algVer
                     && this.OId == pk.OId
                     && this.DId == pk.DId
                     && this.wayId == pk.wayId
                     && this.subroadSeq == pk.subroadSeq
                     && this.wayPercent == pk.wayPercent
                    && this.subOrigIndex == pk.subOrigIndex
                    && this.subDestIndex == pk.subDestIndex
                    && this.subroadLength == pk.subroadLength
                    && this.subroadTime == pk.subroadTime)
                {
                    return true;
                }
                else
                {
                    return false;
                }
            }
            return false;
        }

        public override int GetHashCode()
        {
            return base.GetHashCode();
        }
    }
}
